// dlg.txt

//		mark_quest_dest(zone,x,y,layer,quest);
//		cancel_out_fight(0,short kill_enc);
//		make_outdoor_enc(short x,short y,short which_enc);
//		set_out_fight_field(short which_field);
// 				which_field is 0-20

begintalkscript;

variables;

short this_sec = 50;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "Deep in this swamp, you find a raised bit of dry soil, covered with brush. The corner of a crate is poking out of it.";
	text2 = "A brief investigation reveals an abandoned cache. There are bags of meal and bolts of homespun cloth, slowly rotting away. You leave that behind. The pouch of coins, you take. It also contains a lump of amber, still covered with dirt from when it was dug out of the peat.";
	code =
		sf(100 + this_sec,1,1);
		change_crafting(0,0,1,0,0);
		change_coins(13,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "A stiff breeze blows down the path, kicking up leaves and dust. You immediately cover your eyes, protecting your vision. This isn't the first time this strange forest has harassed you.";
	text2 = "When the wind calms down, you wipe your eyes and look around. The woods have shifted around.";
	code =
		sf(100 + this_sec,2,1);
		set_terrain(0,20,254,118);
		set_terrain(0,20,255,118);
		set_terrain(0,28,255,118);
		set_terrain(0,28,256,118);
		
		make_outdoor_enc(14,249,0);
		make_outdoor_enc(20,250,1);
		make_outdoor_enc(14,260,0);
		make_outdoor_enc(20,262,1);
		
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0 && get_ran(1,0,100) < 30;
	text1 = "You hear whispering nearby. It it very quiet, but it seems like human speech. It's too quiet for you to make out a word of it. It seems to come from the west.";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0 && get_ran(1,0,100) < 30;
	text1 = "You hear the snap of a twig. Loud and clear. Something stepped on it and broke it. You think it was to the east.";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The farther south you get, the brighter the sun gets. The trees are larger and leafier. The birds are chirpier. For once, the Kranas Woods actually seem welcoming. This is one corner of this land where the magic welcomes all.";
	text2 = "Yet, not all are cheered. There is a small group of pilgrims ahead. Two guards, several young woodfolk, and three elderly Ro. The age of the elders keeps them moving slowly. They all look very sad.";
	text3 = "When they see you, they look nervous. They move off to the edge of the path, hoping to quietly let you by.";
	code =
		cancel_out_fight(0,1);
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Stop them.";
	text1 = "You block their path. The guards and the elders step back, and one of the young Ro steps forward to greet you.";
	text2 = "_Hello, outsider,_ she says. _We are peaceful Ro visiting the groves on private business. We mean only respect. We ask to be let by._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Let them go.";
	text1 = "They are plainly relieved. Their business is unhappy and private. They move on as quickly as they can, heading south.";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_I'd just like to know about the area._";
	text1 = "_The Grove of Tranquility is south. Your Haven fort is north. That is all we know._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Where are you going?_";
	text1 = "_We choose not to say. It is private business of our clan._";

begintalknode;
	state = 12;
	nextstate = 11;
	condition = 1;
	question = "_Never mind, then._";
	text1 = "_Thank you for respecting our ways._";
	code =
		ro_faction(1);
	break;

begintalknode;
	state = 12;
	nextstate = 11;
	condition = 1;
	question = "_You will tell me if you know what's good for you._";
	text1 = "She looks toward the elders. It's warm, but they are shivering anyway. She says, _We are going home. That is all we have to say. We are ending our journey. I hope you are pleased._";
	code =
		ro_faction(-2);
	break;
	
begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Move on._";
	text1 = "They look at each other, unsure what to do. Then they move off the path and wait for you to leave. Eventually, you move on. When you look back later, you see that they have disappeared into the woods.";
	action = END_TALK;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				